<?php
$datYear = date("Y");
if((isset($_REQUEST['cboCardType'])) && ($_REQUEST['cboCardType'] != "") )
	$cboCardType = cleanFormInput($_REQUEST['cboCardType']);
else 
	$cboCardType = 2;
	// if(!$txtName){ 
	// 	$txtName = $myrow["FirstName"]."&nbsp;".$myrow["Surname"];
	// }
	//<table cellpadding='2' cellspacing='0' class='Normal' border='0' align='left' width='100%'> 
     echo "
	 
		<tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td width='50'><img src='./images".SITE_SUFFIX."/space.gif' width='50' height='1' border='0' alt='' /></td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
		</tr>

		<tr>
			<td>
				&nbsp;
			</td>
	         <td align='right' >
				*Card Type :&nbsp;
			 </td>
	         <td colspan='3'>";
	         	CreateDropDown("cboCardType", "SELECT * FROM tblCardType order by CardType", $strRefresh, $cboCardType);//2 = visa
			 echo "
			 </td>
	     </tr>";
		 
		 if($cboCardType){
		 	
			if(($cboCardType=='4')||($cboCardType=='8')){
				//switch
				$intCardLength = 19;
			}else{
				//All other cards
				$intCardLength = 19;
			}
			
			 echo "
			 <tr>
				<td>
					&nbsp;
				</td>
				<td align='right'>*Name&nbsp;On&nbsp;Card&nbsp;:&nbsp;</td>	
				<td colspan='3'><input type=\"text\" name=\"txtName\" value = \"".$txtName."\" size= \"30\" maxlength=\"60\"></td>
		     </tr>
			 
		     <tr>
				<td>
					&nbsp;
				</td>
		         <td align='right'>*Card Number :&nbsp;</td>
		         <td colspan='3'>
				 	<input type=\"text\" name=\"txtCardNumber\" value = \"".$txtCardNumber."\" size= '$intCardLength' maxlength='$intCardLength'>
		         </td>
		     </tr>
			 
		
			<tr>
				<td>
					&nbsp;
				</td>
		         <td align='right'>*3 Digit CV2 No. :&nbsp;</td>
		         <td colspan='3'>
				 	<input type=\"text\" name=\"txtCSCNumber\" value = \"".$txtCSCNumber."\" size= \"4\" maxlength=\"4\">
					<a href=\"javascript:;\" onMouseUp=\"MM_openBrWindow('".ScreenURL("CreditCardCSCHelp")."','LargePhoto','toolbar=no,menubar=no,scrollbars=yes,width=400,height=430')\">
						what is this?
					</a>
		         </td>
		     </tr>
			 
		     <tr>
				<td>
					&nbsp;
				</td>
		         <td align='right'>*Start Date :&nbsp;</td>
		         <td colspan='3'>";
		         	CreateDropDownRange("cboStartMonth","1", "12", "", $cboStartMonth);
				 	CreateDropDownRange("cboStartYear", DateAdd(date("d/m/Y"),-4,"year","Y"),$datYear, "", $cboStartYear);
				 echo "(&nbsp;if available)
				 </td>
		     </tr>
			 
		     <tr>
		         <td>
					&nbsp;
				</td>
		         <td align='right'>*Expiry Date :&nbsp;</td>
		         <td colspan='3'>";
		         	CreateDropDownRange("cboExpiryMonth", "1","12", "", $cboExpiryMonth);
				 	CreateDropDownRange("cboExpiryYear",$datYear ,DateAdd(date("d/m/Y"),5,"year","Y"), "", $cboExpiryYear);
				 echo "
				 </td>
		     </tr>";
				//switch
				if(($cboCardType=='4')||($cboCardType=='8')){
					echo "
				     <tr>
						<td>
							&nbsp;
						</td>
				         <td align='right'>Issue No  :&nbsp;</td>
				         <td colspan='3'>";
				         	CreateDropDownRange("cboIssueNo", "1","12", "", $cboIssueNo);
						 echo "(&nbsp;where shown)
				         </td>
				     </tr>";
				 }
		 }
	/*
	echo "
	 </table>";
	*/



?>
